<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>固定位置技巧2</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .mask {
            background-color: rgba(0, 0, 0, 0.3);
            position: fixed;
            top: 0;
            bottom: 0;
            right: 0;
            left: 0;
        }
    </style>
</head>
<body>
<div class="mask"></div>
</body>
</html>